home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / comm / tcp / facts.lha / facts4.3 / Install < prev    next >
Text File  |  2000-08-01  |  7KB  |  225 lines

  1. ; $VER: FACTS3Install 1.4 (01.08.00)
  2.  
  3. (set #inst-ver (/ @installer-version 65536))
  4. (if (< #inst-ver 43)
  5.     (abort "You are running an old version of Installer.\n\n"
  6.             "Please update to at least version 43, available on Aminet.")
  7. )
  8.  
  9. (welcome)
  10.  
  11. (set #ver-verstr (getversion "C:Version"))
  12. (set #ver-ver (/ #ver-verstr 65536))
  13.  
  14. ;(if (< #ver-ver 44)
  15. ;    (
  16. ;(message "The FACTS installation will start by updating your Version command.\n\n"
  17. ;            "Please read the following text before proceeding.\n\n"
  18. ;            "Note that if v40.3 if already installed, you will not be prompted to replace it..." (all))
  19. ;
  20. ;        (run "SYS:Utilities/Multiview Version_v40.3/Version_ReadMe")
  21. ;
  22. ;    (copylib
  23. ;        (prompt "If you have a version command older than v40.3, "
  24. ;                   "you may experience problems with dates in year 2000 and above.")
  25. ;        (help "Dates in version strings display incorrectly on WB 3.0 and 3.1 versions "
  26. ;                "of the Version command - please install this update.\n\n" @copylib-help)
  27. ;        (source "Version_v40.3/Version")
  28. ;        (dest "C:")
  29. ;        (confirm "expert")
  30. ;    )
  31. ;
  32. ;    )
  33. ;)
  34.  
  35. (set @default-dest
  36.     (askdir
  37.         (prompt "Where would you like to install FACTS?")
  38.         (help "It is recommended that FACTS be running all the time, so "
  39.         "WBStartUp is the logical place.\n\n" @askdir-help)
  40.         (default "SYS:WBStartUp")
  41.     )
  42. )
  43.  
  44. (startup "RexxMast"
  45.     (prompt "FACTS REQUIRES ARexx to be active when it starts up.  "
  46.     "To do this, the RexxMast command should be executed in your "
  47.     "user-startup script.\n\nDoes this need adding? (if you are not "
  48.     "sure, it is safe to proceed with this anyway)")
  49.     (help @startup-help)
  50.     (command "RexxMast >NIL:")
  51.     (confirm "expert")
  52. )
  53.  
  54. (set #already-installed (exists (tackon @default-dest "Facts.info")))
  55. (set #timeserver-var (exists "ENVARC:TIMESERVER"))
  56.  
  57. (if #already-installed
  58.     (
  59.         (set #facts-vernum (getversion (tackon @default-dest "Facts")))
  60.         (set #facts-ver (/ #facts-vernum 65536))
  61.         (copylib
  62.             (prompt "Please check the version of FACTS you are copying against "
  63.             "any which might already be installed.")
  64.             (help @copylib-help)
  65.             (source "Facts")
  66.             (dest @default-dest)
  67.             (optional "askuser" "force" "oknodelete")
  68.         )
  69.  
  70.         (if (< #facts-ver 3)
  71.             (
  72.                 (iconinfo
  73.                     (prompt "Updating TIMESERVER config file...")
  74.                     (help @iconinfo-help)
  75.                     (dest (tackon @default-dest "Facts"))
  76.                     (gettooltype "SERVICE" "#service")
  77.                     (gettooltype "TIMEOUT" "#timeout")
  78.                     (safe)
  79.                 )
  80.                 (set #timeserver (getenv "ENV:TIMESERVER"))
  81.                 (set #extra-config ("%s:%s:%s" #timeserver #service #timeout))
  82.                 (textfile
  83.                     (prompt "You appear to be updating from a pre-3.0 version of FACTS.\n"
  84.                                 "Do you want to update your TIMESERVER variable to the newer format?\n\n"
  85.                                 "NB: AutoDST settings have also changed - please check and update this manually "
  86.                                 "if necessary")
  87.                     (help "Although FACTS 3 will read FACTS 2.x TIMESERVER variables, "
  88.                             "this update procedure will ensure that all your previous prefs are kept "
  89.                             "intact.\n\n" @textfile-help)
  90.                     (dest "ENV:TIMESERVER")
  91.                     (append #extra-config)
  92.                     (confirm)
  93.                 )
  94.                 (copyfiles
  95.                     (prompt "Copying ENV: to ENVARC:...")
  96.                     (help @copyfiles-help)
  97.                     (source "ENV:TIMESERVER")
  98.                     (dest "ENVARC:")
  99.                 )
  100.             )
  101.         )
  102.  
  103.         (if (exists "ENVARC:TIMESERVER")
  104.             (
  105.                 (copyfiles
  106.                     (prompt "Moving old timeserver variable...")
  107.                     (help @copyfiles-help)
  108.                     (source "ENVARC:TIMESERVER")
  109.                     (dest "ENVARC:FACTS")
  110.                     (newname "TIMESERVER.0")
  111.                 )
  112.                 (delete "ENVARC:TIMESERVER")
  113.             )
  114.         )
  115.         (if (exists "ENV:TIMESERVER")
  116.             (
  117.                 (copyfiles
  118.                     (prompt "Moving old timeserver variable...")
  119.                     (help @copyfiles-help)
  120.                     (source "ENV:TIMESERVER")
  121.                     (dest "ENV:FACTS")
  122.                     (newname "TIMESERVER.0")
  123.                 )
  124.                 (delete "ENV:TIMESERVER")
  125.             )
  126.         )
  127.     )
  128.  
  129.     (
  130.         (copylib
  131.             (prompt "Please check the version of FACTS you are copying against "
  132.             "any which might already be installed.")
  133.             (help @copylib-help)
  134.             (source "Facts")
  135.             (dest @default-dest)
  136.             (infos)
  137.         )
  138.  
  139.         (tooltype
  140.             (prompt "Do you want FACTS to run silently in the background?\n\n"
  141.             "If you would prefer it to show the GUI on startup, please skip "
  142.             "this part.")
  143.             (help @tooltype-help)
  144.             (dest (tackon @default-dest "Facts"))
  145.             (settooltype "CXPOPUP" "NO")
  146.             (confirm "expert")
  147.         )
  148.  
  149.     )
  150. )
  151.  
  152.         (copylib
  153.             (prompt "Please check the version of SLEFF you are copying against "
  154.             "any which might already be installed.")
  155.             (help "SLEFF is the Server List Editor for FACTS\n\n" @copylib-help)
  156.             (source "SLEFF")
  157.             (dest "SYS:Prefs")
  158.             (infos)
  159.             (confirm)
  160.         )
  161.  
  162. (set #doc-dir
  163.     (copyfiles
  164.         (prompt "Do you want to copy the documentation?")
  165.         (help @copyfiles-help)
  166.         (source "Facts.guide")
  167.         (infos)
  168.         (dest "HELP:English")
  169.         (optional "askuser" "force")
  170.         (confirm "expert")
  171.     )
  172. )
  173.  
  174. (if (exists "libs:locale.library")
  175.     (copyfiles
  176.         (prompt "Select languages you wish to install (English is built in)")
  177.         (help "FACTS supports locale.library!\n\n" @copyfiles-help)
  178.         (source "catalogs")
  179.         (dest "LOCALE:catalogs")
  180.         (all)
  181.         (confirm "expert")
  182.     )
  183. )
  184.  
  185. (copyfiles
  186.     (prompt "Do you want to install the example ARexx scripts in REXX:?\n\n"
  187.     "See Facts docs for more details")
  188.     (help @copyfiles-help)
  189.     (source "Rexx")
  190.     (dest "REXX:")
  191.     (optional "askuser" "force")
  192.     (confirm "expert")
  193.     (all)
  194. )
  195.  
  196. (working "Starting ARexx...")
  197.  
  198. (run "RexxMast >NIL:")
  199.  
  200. (set #rexx-string ("install.rexx %s" (tackon @default-dest "Facts")))
  201.  
  202. (rexx #rexx-string
  203.     (prompt "I will now quit any old versions of FACTS, and "
  204.     "load the new one")
  205.     (help "Does what it says!  Needs ARexx to be running.")
  206. )
  207.  
  208. (run ("WBRun" (tackon @default-dest "Facts")))
  209.  
  210. (set #time (getenv "T:TIME"))
  211.  
  212. (if (> #inst-ver 43)
  213.     (
  214. ;    (openwbobject @default-dest (safe))
  215. ;    (showwbobject (tackon @default-dest "Facts"))
  216.     (openwbobject #doc-dir)
  217.     (showwbobject (tackon #doc-dir "Facts.guide"))
  218.     )
  219. )
  220.  
  221. (exit "Finished!\n\n\nThe current time is\n\n" #time
  222. "\n\n\nFACTS has been started, please ensure your timezone is set "
  223. "correctly and then save config." (quiet))
  224.  
  225.